# 迭代器
import sys

list1 = [1, 2, 3, 4, 5]
i = iter(list1)
b = [item for item in i if item > 3]
for item in b:
    print(item)

while True:
    try:
        print (next(i))
    except StopIteration:
        print('迭代结束！')
        sys.exit()